package org.aeon.entity.dto;

import lombok.Data;

import java.io.Serial;
import java.io.Serializable;
import java.util.Date;
import java.util.Objects;

/**
 * @author: MissingAeon
 * @date: 2024/2/23 14:21
 * @description:
 */
@Data
public class UserInfoDto implements Serializable {

    @Serial
    private static final long serialVersionUID = 2579704091566891758L;

    private Long id;

    private String username;

    private String password;

    private String nickname;

    private String email;

    private Boolean relation;

    private Date startTime;

    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;
        UserInfoDto userInfoDto = (UserInfoDto) o;
        if (id != null && id.equals(userInfoDto.id)) return true;
        return username != null && username.equals(userInfoDto.username);
    }

    public int hashCode() {
        return Objects.hash(id);
    }

}
